package com.baidumap.administrator.happystudy.model;

import com.ab.util.AbJsonUtil;

import java.util.List;

/**
 * 描述：
 * 作者：xiaoxing on 17/4/21 23:19
 * 邮箱：2235445233@qq.com
 */
public class WaiMaiGoodsList {


    /**
     * code : 200
     * msg : success
     * data : [{"product_id":"1950","product_name":"鸡蛋羹","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-16/58f2e26793bef.jpg","buy_numbers":"0","price":"2.00","reviews":"100"},{"product_id":"1959","product_name":"淮南牛肉粉（大）","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-16/58f2dfabdfb96.jpg","buy_numbers":"0","price":"9.00","reviews":"100"},{"product_id":"1961","product_name":"淮南牛肉粉（中）","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-16/58f2df914e6ee.jpg","buy_numbers":"0","price":"8.00","reviews":"100"},{"product_id":"2843","product_name":"五香烧饼","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-15/58f1968e98991.png","buy_numbers":"0","price":"1.50","reviews":"100"},{"product_id":"2850","product_name":"麦多馅饼 香辣鱿鱼味","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-15/58f1966399824.png","buy_numbers":"0","price":"4.50","reviews":"100"},{"product_id":"2854","product_name":"炒菜餐饮","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-15/58f19637591ba.png","buy_numbers":"0","price":"2.00","reviews":"100"},{"product_id":"2961","product_name":"一品酱香牛肉面","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-16/58f3023443942.jpg","buy_numbers":"0","price":"10.50","reviews":"100"},{"product_id":"2962","product_name":"西红柿鸡蛋面","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-16/58f3030a85dde.jpg","buy_numbers":"0","price":"8.50","reviews":"100"},{"product_id":"2963","product_name":"西红柿火腿面","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-16/58f303dc6c168.jpg","buy_numbers":"0","price":"8.50","reviews":"100"},{"product_id":"2964","product_name":"酸菜肉丝面","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-16/58f304b9b4ec2.jpg","buy_numbers":"0","price":"9.50","reviews":"100"},{"product_id":"2965","product_name":"香菇肉丝面","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-16/58f305d34b8bb.jpg","buy_numbers":"0","price":"9.50","reviews":"100"},{"product_id":"2966","product_name":"榨菜肉丝面","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-16/58f306d65cd39.jpg","buy_numbers":"0","price":"9.50","reviews":"100"},{"product_id":"2967","product_name":"尖椒肥肠面","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-16/58f3081d1dd4e.jpg","buy_numbers":"0","price":"12.50","reviews":"100"},{"product_id":"2971","product_name":"牛肉油泼面","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-16/58f30bc318f79.jpg","buy_numbers":"0","price":"12.50","reviews":"100"},{"product_id":"2973","product_name":"肉丝炒饼","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-16/58f30db65fd77.jpg","buy_numbers":"0","price":"8.50","reviews":"100"},{"product_id":"2977","product_name":"火腿炒饭","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-16/58f310d53e133.jpg","buy_numbers":"0","price":"8.50","reviews":"100"},{"product_id":"2978","product_name":"扬州炒饭","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-16/58f311b76a1d7.jpg","buy_numbers":"0","price":"10.50","reviews":"100"},{"product_id":"2980","product_name":"老干妈炒饭","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-16/58f3139949f45.jpg","buy_numbers":"0","price":"10.50","reviews":"100"}]
     */

    private String code;
    private String msg;
    private List<DataBean> data;

    /**
     * 用json构造自己
     *
     * @param json
     */
    public WaiMaiGoodsList(String json) {
        WaiMaiGoodsList result = AbJsonUtil.fromJson(json, this.getClass());
        this.code = result.getCode();
        this.msg = result.getMsg();
        this.data = result.getData();

    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean {
        /**
         * product_id : 1950
         * product_name : 鸡蛋羹
         * product_pic1 : http://bc.bvhao.cc/Uploads/2017-04-16/58f2e26793bef.jpg
         * buy_numbers : 0
         * price : 2.00
         * reviews : 100
         */

        private String product_id;
        private String product_name;
        private String product_pic1;
        private String buy_numbers;
        private String price;
        private String reviews;

        public String getProduct_id() {
            return product_id;
        }

        public void setProduct_id(String product_id) {
            this.product_id = product_id;
        }

        public String getProduct_name() {
            return product_name;
        }

        public void setProduct_name(String product_name) {
            this.product_name = product_name;
        }

        public String getProduct_pic1() {
            return product_pic1;
        }

        public void setProduct_pic1(String product_pic1) {
            this.product_pic1 = product_pic1;
        }

        public String getBuy_numbers() {
            return buy_numbers;
        }

        public void setBuy_numbers(String buy_numbers) {
            this.buy_numbers = buy_numbers;
        }

        public String getPrice() {
            return price;
        }

        public void setPrice(String price) {
            this.price = price;
        }

        public String getReviews() {
            return reviews;
        }

        public void setReviews(String reviews) {
            this.reviews = reviews;
        }
    }
}
